package com.dhy.utils;

import lombok.Getter;
import org.springframework.stereotype.Component;

@Component
public class AjaxResult {

    private Boolean success = true;
    private String message = "操作成功";
    private Object data;

    private AjaxResult() {
    }

    public static AjaxResult ajaxResultBuild(){
         return new AjaxResult();
    }

    public Boolean getSuccess() {
        return success;
    }

    public String getMessage() {
        return message;
    }

    public Object getData() {
        return data;
    }

    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }

    public AjaxResult setMessage(String message) {
        this.message = message;
        return this;
    }

    public AjaxResult setData(Object data) {
        this.data = data;
        return this;
    }
}
